import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class PayErrorPage extends StatefulWidget {
  @override
  _PayErrorPageState createState() => _PayErrorPageState();
}

class _PayErrorPageState extends State<PayErrorPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('支付失败'),
        centerTitle: true,
      ),
      body: Stack(
        children: [

          Center(
            child: Container(
              width: 700.w,
              height: 930.w,
              padding: EdgeInsets.only(top:80.w,),
              color: Colors.white,
              child: Column(
                children: [
                  Container(
                    alignment: Alignment.center,
                    height:80.w,
                    child: Text('订单支付失败',style: TextStyle(
                      fontSize: 35.sp,
                      fontWeight: FontWeight.bold
                    ),),
                  ),
                  Divider(),
                  ListTile(
                      dense:true,
                    title: Text('订单编号'),
                    trailing: Text('wx03423423402152314234125234'),
                  ),
                  ListTile(
                    dense:true,
                    title: Text('下单时间'),
                    trailing: Text('2020-5205-2202-21-12-2'),
                  ),
                  ListTile(
                    dense:true,
                    title: Text('支付方式'),
                    trailing: Text('微信支付'),
                  ),
                  ListTile(
                    dense:true,
                    title: Text('支付金额'),
                    trailing: Text('300.00'),
                  ),
                  ListTile(
                    dense:true,
                    title: Text('失败原因'),
                    trailing: Text('取消支付'),
                  ),

                  Divider(),
                  SizedBox(height:30.w,),
                  Container(
                    width: 650.w,
                    height:80.w,
                    child: FlatButton(
                      shape: RoundedRectangleBorder(
                          borderRadius: BorderRadius.all(Radius.circular(25))),
                      color: Colors.red,
                      child: Text(
                        '重新支付',
                        style: TextStyle(color: Colors.white),
                      ),
                      onPressed: () {},
                    ),
                  ),
                  SizedBox(height:30.w,),
                  Container(
                    width: 650.w,
                    height:80.w,
                    child: OutlineButton(
                      shape: RoundedRectangleBorder(
                          borderRadius: BorderRadius.all(Radius.circular(25))),
                      borderSide: BorderSide(color: Colors.red),
                      child: Text(
                        '返回首页',
                        style: TextStyle(color: Colors.red),
                      ),
                      onPressed: () {},
                    ),
                  )
                ],
              ),
            ),
          ),
          Positioned(
            left: 300.w,
            top: 100.w,
            child: Container(
              width: 130.w,
              height:130.w,
              alignment: Alignment.center,
              decoration: BoxDecoration(
                  borderRadius: BorderRadius.all(Radius.circular(65.w)),
                  color: Colors.grey
              ),
              child: Icon(
                Icons.close,
                size: 100.sp,
                color: Colors.white,
              ),
            ),
          ),
        ],
      ),
    );
  }
}
